package com.itstyle.seckill.topic.guava;

import com.google.common.eventbus.Subscribe;

import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * @Auther: liuwenxiang
 * @Date: 2020/4/3 13:13
 * @Description:
 */
public class EventListen2 {

    @Subscribe
    public void test(CustomEvent event){
        try {
            TimeUnit.SECONDS.sleep(4);
            System.out.println(new Date()+"我休眠4s，消费一次我是EventListen2:"+event.getAge());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
